home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / share / Dos / VARIOS / pascal / DELPHI.SWG / 0033_Resource Expert: What It Is and How to I.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-02-21  |  4.7 KB  |  111 lines

  1.  
  2. Resource Expert: what it is and how to install and use it.
  3.  
  4.  
  5. What is the Resource Expert
  6.  
  7. The Resource Expert is a Delphi expert add-on that is available
  8. as a part of the Delphi Rad Pack.  The expert assists the
  9. programmer in porting existing projects to Delphi by converting
  10. dialog and menu resource scripts intended for use in traditional
  11. Windows applications.  Dialog resources and their contents are
  12. converted to Delphi forms with the analogous controls converted
  13. to Delphi components.
  14.  
  15.  
  16. How to install the Resource Expert
  17.  
  18. The Resource Expert is installed via the Delphi Rad Pack's
  19. Resource Workshop 4.5 install procedure.  Once installed, it is
  20. incorporated into the Delphi component library and is available
  21. as an option on the Delphi Help Menu or via the Experts page of
  22. the Forms Gallery dialog.  Installation of the Resource Expert
  23. files may be installed from within the Windows environment or
  24. from the command line under Windows 95 or Windows NT.
  25.  
  26.  
  27. To install the Resource Expert files from within Windows,
  28.  
  29.   1) Begin the installation procedure for Borland Resource
  30.      Workshop.
  31.   2) On the third dialog, entitled 'Resource Workshop - Resource
  32.      Expert Options', ensure that the 'Install Resource Expert'
  33.      check box is checked.
  34.   3) The 'Install to:' entry indicates the destination directory
  35.      for the Resource Expert files, indicating C:\DELPHI\RCEXPERT
  36.      by default.  Change this entry as needed.
  37.   4) Proceed with the rest of the Resource Workshop installation
  38.      process as normal.
  39.  
  40. To install the Resource Expert files from the command line, type
  41. the following commands,
  42.  
  43.   1) MD C:\DELPHI\RCEXPERT
  44.   2) CD C:\DELPHI\RCEXPERT
  45.   3) E:\INSTALL\RW\UNPAQ -X E:\INSTALL\RW\RESEXP.PAK
  46.  
  47. Note: The last command above assumes that the E: drive is a
  48. CD-ROM drive containing the Rad Pack Installation CD.
  49.  
  50.  
  51. Once the installation of the Resource Expert files is completed,
  52. the Delphi Component Library must be recompiled.  To do this,
  53.  
  54.   1) Load Delphi.
  55.   2) Select Options|Install Components.
  56.   3) Click the Add... button.
  57.   4) When the Add Module dialog appears, enter the full path name
  58.      of the rcexpert.pas file or find the file via the Browse...
  59.      button.
  60.   5) Finally, choose the OK button on the Install Components
  61.      Dialog.
  62.  
  63.  
  64.  
  65. How to use the Resource Expert
  66.  
  67. To convert a resource script, all source files normally required
  68. to compile the script must be present.  This would include .RC,
  69. .MNU, or .DLG file(s) and any .H or .PAS include files they refer
  70. to.  Resource scripts typically use WINDOWS.H and BWCC.H.  These
  71. files are usually located in directories such as \BC4\INCLUDE or
  72. \BP7\UNITS.  The Resource Expert supports the RC language
  73. extensions defined by Resource Workshop.
  74.  
  75. Again, the Resource Expert may be invoked via the Help|Resource
  76. Expert menu option or via the Experts page of the Forms Gallery
  77. dialog.  The latter will appear if the 'Use on new form' check
  78. box is checked on the Preferences page of the Environment Options
  79. dialog.
  80.  
  81. Once the Resource Expert has been invoked, click the 'Next'
  82. button to bypass the page that introduces the expert to the user.
  83. The second page of the expert allows the user to select the
  84. resource scripts to convert.  A number of scripts may be chosen
  85. provided that they all reside in the same directory.  The
  86. particular type of script to view (.RC, .DLG or .MNU) can be
  87. selected via the 'List Files of Type' combo box.  After selecting
  88. the scripts to convert, click the 'Next' button again.  The third
  89. page presents a single 'Include Path' edit box.  Enter the list
  90. of directories containing .H, .INC, or .PAS include files used by
  91. the resource scripts, (if any).  Each directory name should be
  92. separated by a semicolon.  Again, click the 'Next' button to
  93. continue.  On the fourth and final page of the expert, the
  94. 'Convert' button appears.  Clicking it begins the actual
  95. conversion process.  If the resources script contain many
  96. dialogs, the 'Show all forms' check box may be un-checked in
  97. order to speed the conversion process and to minimize impact on
  98. Windows system resources.
  99.  
  100. If a syntax error is encountered during the conversion process,
  101. the erroneous statement will be discarded and conversion will
  102. resume at the next statement or block.  Errors will be noted in
  103. the log file ERRLOG.TXT and displayed in a Delphi editor window.
  104.  
  105. Once the conversion process is complete, separate forms for each
  106. dialog resource will have been created.  For menu resources, a
  107. simple form containing the converted menu component will have
  108. been created.  If a project was active before the conversion
  109. began, the converted forms are added to the project.  Each form
  110. may now be used and modified as would any Delphi form.
  111.